import request from '@/utils/request'

// 查询仪盘详细
export function getLogPanel(id) {
  return request({
    url: id,
    method: 'get'
  })
}

// 查询仪盘列表
export function listPanel(query) {
  return request({
    url: '/system/panel/list',
    method: 'get',
    params: query
  })
}

// 查询仪盘详细
export function getPanel(id) {
  return request({
    url: '/system/panel/' + id,
    method: 'get'
  })
}

// 新增仪盘
export function addPanel(data) {
  return request({
    url: '/system/panel',
    method: 'post',
    data: data
  })
}

// 修改仪盘
export function updatePanel(data) {
  return request({
    url: '/system/panel',
    method: 'put',
    data: data
  })
}

// 删除仪盘
export function delPanel(id) {
  return request({
    url: '/system/panel/' + id,
    method: 'delete'
  })
}

// 查询当日正常仪盘列表
export function currentNormalListPanel(query) {
  return request({
    url: '/system/panel/currentNormalList',
    method: 'get',
    params: query
  })
}

// 查询历史正常仪盘列表
export function normalListPanel(query) {
  return request({
    url: '/system/panel/normalList',
    method: 'get',
    params: query
  })
}

// 查询当日异常仪盘列表
export function currentAbnormalListPanel(query) {
  return request({
    url: '/system/panel/currentAbnormalList',
    method: 'get',
    params: query
  })
}

// 查询历史异常仪盘列表
export function abnormalListPanel(query) {
  return request({
    url: '/system/panel/abnormalList',
    method: 'get',
    params: query
  })
}